<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    :root {
      --fontBig: 6em;
      --fontxxxl: 5.5em;
      --fontxxl: 3.4375em;
      --fontxl: 2.75em;
      --fontlg: 1.9375em;
      --fontmd: 1.375em;
      --fontsm: 1.125em;
      --fontxs: 1em;
      --fontxxs: 0.75em;
      --dark: #000000;
      --grey: #666666;
      --greyLight: #979797;
      --offWhite: #eeeeee;
      --white: #ffffff;
      --blue: #0071e3;
      --blueRgba: "0, 113, 227";
      --fontL: "Source Sans Pro light";
      --fontR: "Source Sans Pro";
      --gradient: #35c3f3 0%, #8b9fe8 20%, #e681d8 39%, #ffa9a4 76%, #fed2ce 100%;
    }

    section {
      width: 100vw;
      height: 100vh;
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      align-items: center;
      background-color: var(--white);
      overflow: hidden;
      margin-top: 300px;
      margin-bottom: 300px;
    }

    p {
      width: 100%;
      height: 50vh;
      z-index: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      color: var(--dark);
      transform: translate(10%, 0px);
    }

    .second {
      transform: translate(20%, 0px);
    }

    span {
      font-size: var(--fontBig);
      width: 90%;
      font-weight: 600;
      text-transform: capitalize;
    }
  </style>
</head>

<body>
  <section>
    <p>
      <span>Flaw-less design with strong durability.</span>
    </p>
    <!-- <p class="second">
      <span>Flat-edge design with toughest smartphone glass.</span>
    </p> -->
  </section>

  <script>
    const $p = document.querySelector('p')
    window.addEventListener('scroll', (e) => {
      let scrolled = document.documentElement.scrollTop / (document.documentElement.scrollHeight - document.documentElement.clientHeight)

      $p.style.transform = `translate(${scrolled * 10}%, 0px)`
    })
  </script>
</body>

</html>